<?

/*
*
*   Excalibur Content Management System
*   Copyright © 2008 Egor "Sontan" Kuryanovich
*
*   Based on Explay Engine v2.0 by Golovdinov Alexander
*
*   Official site: www.excms.ru
*   Contact e-mail: support@excms.ru
*
*   GNU General Public License original source:
*   http://www.gnu.org/licenses/gpl-3.0.html
*
*/


error_reporting (E_ALL ^ E_NOTICE);

header('Cache-control: no-cache');
header('Content-type: text/html; charset=utf-8');

$EXCMS = "work";

include $_SERVER['DOCUMENT_ROOT'].'/engine/settings.php';
include $_SERVER['DOCUMENT_ROOT'].'/engine/functions.php';
include $_SERVER['DOCUMENT_ROOT'].'/engine/mysql.class.php';
include $_SERVER['DOCUMENT_ROOT'].'/engine/templates.class.php';

if (_get(1) == '') exit ('No parametrs.');

$db = new DB($server, $dbusername, $dbpassword, $dbname);
$db->connect();

$file = file ($_SERVER['DOCUMENT_ROOT'].'/api_engine/modules.txt');

foreach ($file as $string) 
{
	$module = explode ('|', $string);
	if ($module[0] == _get(1)) include $_SERVER['DOCUMENT_ROOT'].'/api_engine/'.trim($module[1]);
}
